package org.myspringframework.springboot001.controller;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fzy
 * @version 1.0
 * 创建时间：       2024-09-23 16:25
 */

@RestController
@ConfigurationProperties(prefix = "hello")
@Data
public class HelloController {
    //@Value("${msg}")
    private String msg;

    @GetMapping("hello")
    public String hello() {
        return msg;
    }
}
